﻿@model LabChecker.Models.TestCase
@{
    ViewBag.Title = string.Format("Test Case #{0}", Model.Index);
}
<h2>@Html.ActionLink("Subjects", "Index", "Subject")
    -> @Html.ActionLink(Model.Task.Subject.Name, "Index", "Task", new { subjectId = Model.Task.Subject.Id }, null)
    -> @Html.ActionLink(Model.Task.Description.Title, "Index", "TestCase", new { taskId = Model.Task.Id }, null)
    -> @string.Format("Test Case #{0}", Model.Index)</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>TestCase</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Input)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Input, 15, 80, null)
            @Html.ValidationMessageFor(model => model.Input)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Answer)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Answer, 15, 80, null)
            @Html.ValidationMessageFor(model => model.Answer)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.IsExample)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsExample)
            @Html.ValidationMessageFor(model => model.IsExample)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ErrorMessage)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ErrorMessage)
            @Html.ValidationMessageFor(model => model.ErrorMessage)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
